I want to save my files as UTF-8 but newlines must not be done with CRLF (Windows convention), but as LF (Unix convetion). How to I do that?
Is it just enough to write "\n" at the end of the line, like this:
String data = "";
data += "My text line 1\n";
data += "My text line 2\n";
?
My file is saved properly so that every line is in it's row and that is good. How do I know is that Windows or Linux convention?
If this information is needed for my question, I'm saving my file with this:
new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), "UTF-8"));
But how do I know if my newlines are saved as LF and not as CRLF ?
Henry :
Yes this works. The file will contain just LF as line separator. To verify, open the file with your favorite hex editor.",
2015-10-17T07:10:37